package com.sisy.demo;

import com.sisy.demo.dao.UserMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@SpringBootApplication
@MapperScan("com.sisy.demo.dao")
@Controller
public class ClApplication {

    public static void main(String[] args) {
        SpringApplication.run(ClApplication.class, args);
    }

    @Value("${version}")
    private String version;
    @Resource
    private UserMapper userMapper;

    @GetMapping("/version")
    @ResponseBody
    String hello(){
        return "demo: " + version;
    }
}
